﻿using Max.PH4.Shoppgin.Admin.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4.Shoppgin.Admin.IService
{
    public interface IOrderMasterService
    {
        /// <summary>
        /// 添加订单
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int Insert(OrderInputDto dto);

        #region 异步操作

        Task<int> UpdateAsync(OrderMasterEntity entity);
        Task<int> UpdateAsync(List<OrderMasterEntity> entities);
        Task<int> DeleteAsync(OrderMasterEntity entity);
        Task<int> DeleteAsync(object id);

        Task<IQueryable<OrderMasterEntity>> QueryAsync();
        Task<IQueryable<OrderMasterEntity>> QueryAsync(string orderNo);

        #endregion

        dynamic Query();
        List<dynamic> GetPayEnumBind();
        dynamic GetOrderDetail(string orderNo);
        IQueryable<OrderMasterEntity> Query(string orderNo,string state, int pageIndex, int pageSize, out int total);

    }
}
